package com.china08.yxyapi.util;

public final class Constants {

    public enum StudentGuardianEnum {

        // 'G0','G1','G2','G3','G4','G5','G6'
        G0("其他", "G0"), G1("爸爸", "G1"), G2("妈妈", "G2"), G3("爷爷", "G3"), G4("奶奶", "G4"), G5("外婆", "G5"), G6("外公", "G6");

        private String nameNick;
        private String code;

        public static String getNameNick(String code) {
            try {
                return StudentGuardianEnum.valueOf(code).getNameNick();
            } catch (Exception exception) {
                return "";
            }
        }

        private StudentGuardianEnum(String nameNick, String code) {
            this.nameNick = nameNick;
            this.code = code;
        }

        public String getNameNick() {
            return nameNick;
        }

        public String getCode() {
            return code;
        }

    }
}
